﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
using LiuYan.Service;
using LiuYan.Web.Controllers;

namespace LiuYan.Web.Areas.Mall.Controllers
{
    public class SearchController : BaseController
    {
        //
        // GET: /Mall/Search/

        public ActionResult Index(string str)
        {
            ViewData["str"] = Server.UrlEncode(str);
            return View();
        }
        /// <summary>
        /// 获取积分列表
        /// </summary>
        /// <param name="pageCount"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public string GetList(int pageCount, int pageIndex,string name)
        {
            return JsonConvert.SerializeObject(new GoodService().GetSearchList(pageIndex, pageCount, Server.UrlDecode(name)));
        }
    }
}
